home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / system / mail / transpor / ifmail23.z / ifmail23 / ifmail / iflib / configdata.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-11  |  14.6 KB  |  389 lines

  1. /*  $Revision: 1.29 $
  2. **
  3. **  Here be configuration data used by various InterNetNews programs.
  4. **  The numbers refer to sections in the config.dist file.
  5. */
  6.  
  7.  
  8. /*
  9. **  1.  MAKE CONFIG PARAMETERS
  10. */
  11.     /* =()<#define @<USE_CHAR_CONST>@_USE_CHAR_CONST>()= */
  12. #define DUNNO_USE_CHAR_CONST
  13. #if    defined(DO_USE_CHAR_CONST)
  14. typedef char const    *STRING;
  15. typedef char * const    CSTRING;
  16. #endif    /* defined(DO_USE_CHAR_CONST) */
  17. #if    defined(DONT_USE_CHAR_CONST)
  18. typedef char        *STRING;
  19. typedef char        *CSTRING;
  20. #endif    /* defined(DONT_USE_CHAR_CONST) */
  21. #if    defined(DUNNO_USE_CHAR_CONST)
  22. #if    defined(__STDC__)
  23. typedef char const    *STRING;
  24. typedef char * const    CSTRING;
  25. #else
  26. typedef char        *STRING;
  27. typedef char        *CSTRING;
  28. #endif    /* defined(__STDC__) */
  29. #endif    /* defined(DUNNO_USE_CHAR_CONST) */
  30.  
  31. /*
  32. **  Declare a function that doesn't return.
  33. */
  34. #if    defined(__dead)
  35.     /* BSD4.4 */
  36. #define NORETURN    __dead
  37. #else
  38. #if    defined(__GNUC__)
  39.     /* GCC */
  40. #define NORETURN    volatile void
  41. #else
  42.     /* Everyone else */
  43. #define NORETURN    void
  44. #endif    /* defined(__GNUC__) */
  45. #endif    /* defined(__dead) */
  46.  
  47.  
  48. /*
  49. **  3.  OWNERSHIPS AND FILE MODES
  50. */
  51.     /* =()<#define NEWSUSER        "@<NEWSUSER>@">()= */
  52. #define NEWSUSER        "news"
  53.     /* =()<#define NEWSGID        "@<NEWSGROUP>@">()= */
  54. #define NEWSGID        "news"
  55.     /* =()<#define NEWSMASTER        "@<NEWSMASTER>@">()= */
  56. #define NEWSMASTER        "usenet"
  57.     /* =()<#define PATHMASTER        "@<PATHMASTER>@">()= */
  58. #define PATHMASTER        "not-for-mail"
  59.     /* Umask to set. */
  60.     /* =()<#define NEWSUMASK        @<NEWSUMASK>@>()= */
  61. #define NEWSUMASK        0
  62.     /* Mode that incoming articles are created under. */
  63.     /* =()<#define ARTFILE_MODE    @<ARTFILE_MODE>@>()= */
  64. #define ARTFILE_MODE    0664
  65.     /* Mode that batch files are created under. */
  66.     /* =()<#define BATCHFILE_MODE    @<BATCHFILE_MODE>@>()= */
  67. #define BATCHFILE_MODE    0664
  68.     /* Mode that directories are created under. */
  69.     /* =()<#define GROUPDIR_MODE    @<GROUPDIR_MODE>@>()= */
  70. #define GROUPDIR_MODE    0775
  71.  
  72.  
  73. /*
  74. **  4.  C LIBRARY DIFFERENCES
  75. */
  76.     /* Use have stdargs, varargs, or neither? */
  77.     /* =()<#define VAR_@<VAR_STYLE>@>()= */
  78. #define VAR_VARARGS
  79.     /* Use BSD4.2 or Posix directory names? */
  80.     /* =()<#define DIR_@<DIR_STYLE>@>()= */
  81. #define DIR_DIRENT
  82.     /* Use flock, lockf, or nothing to lock files? */
  83.     /* =()<#define LOCK_@<LOCK_STYLE>@>()= */
  84. #define LOCK_FLOCK
  85.     /* Do you have <unistd.h>? */
  86.     /* =()<#define @<HAVE_UNISTD>@_HAVE_UNISTD>()= */
  87. #define DONT_HAVE_UNISTD
  88.     /* Do you have setbuffer? */
  89.     /* =()<#define @<HAVE_SETBUFFER>@_HAVE_SETBUFFER>()= */
  90. #define DO_HAVE_SETBUFFER
  91.     /* Do you have gettimeofday? */
  92.     /* =()<#define @<HAVE_GETTIMEOFDAY>@_HAVE_GETTIMEOFDAY>()= */
  93. #define DO_HAVE_GETTIMEOFDAY
  94.     /* Do you have fchmod? */
  95.     /* =()<#define @<HAVE_FCHMOD>@_HAVE_FCHMOD>()= */
  96. #define DO_HAVE_FCHMOD
  97.     /* Do you have setsid()? */
  98.     /* =()<#define @<HAVE_SETSID>@_HAVE_SETSID>()= */
  99. #define DONT_HAVE_SETSID
  100.     /* Does your (struct tm) have a tm_gmtoff field? */
  101.     /* =()<#define @<HAVE_TM_GMTOFF>@_HAVE_TM_GMTOFF>()= */
  102. #define DO_HAVE_TM_GMTOFF
  103.     /* Does your (struct stat) have a st_blksize field? */
  104.     /* =()<#define @<HAVE_ST_BLKSIZE>@_HAVE_ST_BLKSIZE>()= */
  105. #define DO_HAVE_ST_BLKSIZE
  106.     /* Use waitpid instead of wait3? */
  107.     /* =()<#define @<HAVE_WAITPID>@_HAVE_WAITPID>()= */
  108. #define DONT_HAVE_WAITPID
  109.     /* Use "union wait" instead of int? */
  110.     /* =()<#define @<USE_UNION_WAIT>@_USE_UNION_WAIT>()= */
  111. #define DO_USE_UNION_WAIT
  112.     /* How to fork? */
  113.     /* =()<#define FORK()    @<FORK>@()>()= */
  114. #define FORK()    vfork()
  115.     /* Do you have symbolic links? */
  116.     /* =()<#define @<HAVE_SYMLINK>@_HAVE_SYMLINK>()= */
  117. #define DO_HAVE_SYMLINK
  118.     /* Does your AF_UNIX bind use sizeof for the socket size? */
  119.     /* =()<#define @<BIND_USE_SIZEOF>@_BIND_USE_SIZEOF>()= */
  120. #define DO_BIND_USE_SIZEOF
  121.     /* Do you have Unix-domain sockets? */
  122.     /* =()<#define @<HAVE_UNIX_DOMAIN>@_HAVE_UNIX_DOMAIN>()= */
  123. #define DO_HAVE_UNIX_DOMAIN
  124.     /* How should close-on-exec be done? */
  125.     /* =()<#define CLX_@<CLX_STYLE>@>()= */
  126. #define CLX_IOCTL
  127.     /* How should non-blocking I/O be done? */
  128.     /* =()<#define NBIO_@<NBIO_STYLE>@>()= */
  129. #define NBIO_FCNTL
  130.     /* How should resource-totalling be done? */
  131.     /* =()<#define RES_@<RES_STYLE>@>()= */
  132. #define RES_RUSAGE
  133.     /* How to get number of available descriptors? */
  134.     /* =()<#define FDCOUNT_@<FDCOUNT_STYLE>@>()= */
  135. #define FDCOUNT_GETDTAB
  136.  
  137.     /* If greater than -1, then use [gs]etrlimit to set that many descriptors. */
  138.     /* If -1, then no [gs]etrlimit calls are done. */
  139.     /* =()<#define NOFILE_LIMIT        @<NOFILE_LIMIT>@>()= */
  140. #define NOFILE_LIMIT        250
  141.     /* Do you need <time.h> as well as <sys/time.h>? */
  142.     /* =()<#define @<NEED_TIME>@_NEED_TIME>()= */
  143. #define DONT_NEED_TIME
  144.     /* What predicate, if any, the <ctype.h> macros need. */
  145.     /* =()<#define CTYPE(isXXXXX, c)    (@<CTYPE>@)>()= */
  146. #define CTYPE(isXXXXX, c)    ((isascii((c)) && isXXXXX((c))))
  147.  
  148.  
  149. /*
  150. **  6.  MISCELLANEOUS CONFIG DATA
  151. */
  152.     /* Use mmap() to read the active file, or read it in? */
  153.     /* =()<#define ACT_@<ACT_STYLE>@>()= */
  154. #define ACT_MMAP
  155.     /* Use our NNTP-server-open routine, or the one in NNTP? */
  156.     /* INND is nicer, but you must install inn.conf files everywhere; NNTP */
  157.     /* is better if you already have lots of /usr/lib/news/server files. */
  158.     /* =()<#define REM_@<REM_STYLE>@>()= */
  159. #define REM_INND
  160.     /* Should rnews save articles that the server rejects? */
  161.     /* =()<#define @<RNEWS_SAVE_BAD>@_RNEWS_SAVE_BAD>()= */
  162. #define DO_RNEWS_SAVE_BAD
  163.     /* Should rnews syslog articles innd already has? */
  164.     /* =()<#define @<RNEWS_LOG_DUPS>@_RNEWS_LOG_DUPS>()= */
  165. #define DONT_RNEWS_LOG_DUPS
  166.     /* Look in _PATH_RNEWSPROGS for rnews unpackers? */
  167.     /* =()<#define @<RNEWSPROGS>@_RNEWSPROGS>()= */
  168. #define DO_RNEWSPROGS
  169.     /* Should rnews try the local host? */
  170.     /* =()<#define @<RNEWSLOCALCONNECT>@_RNEWSLOCALCONNECT>()= */
  171. #define DO_RNEWSLOCALCONNECT
  172.     /* Disallow posts with more than 50% inclusion (">") lines? */
  173.     /* (This is only for inews and nnrpd.) */
  174.     /* =()<#define @<CHECK_INCLUDED_TEXT>@_CHECK_INCLUDED_TEXT>()= */
  175. #define DO_CHECK_INCLUDED_TEXT
  176.     /* Put hosts in the inews Path header? */
  177.     /* =()<#define @<INEWS_PATH>@_INEWS_PATH>()= */
  178. #define DONT_INEWS_PATH
  179.     /* Munge the gecos field of password entry? */
  180.     /* =()<#define @<MUNGE_GECOS>@_MUNGE_GECOS>()= */
  181. #define DO_MUNGE_GECOS
  182.     /* How many times to try before giving up */
  183.     /* =()<#define MAX_FORKS    @<MAX_FORKS>@>()= */
  184. #define MAX_FORKS    10
  185.     /* Largest acceptable article size; 0 allows any size */
  186.     /* =()<#define MAX_ART_SIZE    @<MAX_ART_SIZE>@>()= */
  187. #define MAX_ART_SIZE    1000000
  188.     /* Value of dbzincore(FLAG) call in innd. */
  189.     /* =()<#define INND_DBZINCORE    @<INND_DBZINCORE>@>()= */
  190. #define INND_DBZINCORE    1
  191.     /* Should sub-processes get a nice(2) value? */
  192.     /* =()<#define @<INND_NICE_KIDS>@_INND_NICE_KIDS>()= */
  193. #define DONT_INND_NICE_KIDS
  194.     /* Value for nice(2) call in innd. */
  195.     /* =()<#define INND_NICE_VALUE    @<INND_NICE_VALUE>@>()= */
  196. #define INND_NICE_VALUE    10
  197.     /* Null-terminated list of unknown commands to not log to syslog. */
  198.     /* =()<#define INND_QUIET_BADLIST    @<INND_QUIET_BADLIST>@>()= */
  199. #define INND_QUIET_BADLIST    NULL
  200.     /* Null-terminated set of illegal distribution patterns. */
  201.     /* =()<#define BAD_DISTRIBS    @<BAD_DISTRIBS>@>()= */
  202. #define BAD_DISTRIBS    "*.*",NULL
  203.     /* Check that poster is the person doing the cancel? */
  204.     /* =()<#define @<VERIFY_CANCELS>@_VERIFY_CANCELS>()= */
  205. #define DO_VERIFY_CANCELS
  206.     /* Log "ctlinnd cancel" commands to syslog? */
  207.     /* =()<#define @<LOG_CANCEL_COMMANDS>@_LOG_CANCEL_COMMANDS>()= */
  208. #define DO_LOG_CANCEL_COMMANDS
  209.     /* File unknown "to.*" groups into the "to" newsgroup? */
  210.     /* =()<#define @<MERGE_TO_GROUPS>@_MERGE_TO_GROUPS>()= */
  211. #define DO_MERGE_TO_GROUPS
  212.     /* File articles in unknown newsgroups into junk? */
  213.     /* =()<#define @<WANT_TRASH>@_WANT_TRASH>()= */
  214. #define DO_WANT_TRASH
  215.     /* Record rejected articles in history? */
  216.     /* =()<#define @<REMEMBER_TRASH>@_REMEMBER_TRASH>()= */
  217. #define DONT_REMEMBER_TRASH
  218.     /* Check the linecount against the Lines header? */
  219.     /* =()<#define @<CHECK_LINECOUNT>@_CHECK_LINECOUNT>()= */
  220. #define DONT_CHECK_LINECOUNT
  221.     /* If checking, the error must be within LINECOUNT_FUZZ lines. */
  222.     /* =()<#define LINECOUNT_FUZZ    @<LINECOUNT_FUZZ>@>()= */
  223. #define LINECOUNT_FUZZ    5
  224.     /* Have innd throttle itself after this many I/O errors. */
  225.     /* =()<#define IO_ERROR_COUNT    @<IO_ERROR_COUNT>@>()= */
  226. #define IO_ERROR_COUNT    50
  227.     /* Default value for ctlinnd -t flag. */
  228.     /* =()<#define CTLINND_TIMEOUT    @<CTLINND_TIMEOUT>@>()= */
  229. #define CTLINND_TIMEOUT    0
  230.     /* Flush logs (and NNRP connections) if we go this long with no I/O. */
  231.     /* =()<#define DEFAULT_TIMEOUT    @<DEFAULT_TIMEOUT>@>()= */
  232. #define DEFAULT_TIMEOUT    300
  233.     /* INND closes channel if inactive this long (seconds). */
  234.     /* =()<#define PEER_TIMEOUT    @<PEER_TIMEOUT>@>()= */
  235. #define PEER_TIMEOUT    (1 * 60 * 60)
  236.     /* NNRP exits if inactive this long (seconds). */
  237.     /* =()<#define CLIENT_TIMEOUT    @<CLIENT_TIMEOUT>@>()= */
  238. #define CLIENT_TIMEOUT    (2 * 60 * 60)
  239.     /* Allow nnrpd readers when paused or throttled? */
  240.     /* =()<#define @<ALLOW_READERS>@_ALLOW_READERS>()= */
  241. #define DO_ALLOW_READERS
  242.     /* Refuse NNTP connections if load is higher then this; -1 disables. */
  243.     /* =()<#define NNRP_LOADLIMIT    @<NNRP_LOADLIMIT>@>()= */
  244. #define NNRP_LOADLIMIT    16
  245.     /* Don't readdir() spool dir if same group within this many seconds. */
  246.     /* =()<#define NNRP_RESCAN_DELAY    @<NNRP_RESCAN_DELAY>@>()= */
  247. #define NNRP_RESCAN_DELAY    60
  248.     /* Do gethostbyaddr on client addresses in nnrp? */
  249.     /* =()<#define @<NNRP_GETHOSTBYADDR>@_NNRP_GETHOSTBYADDR>()= */
  250. #define DO_NNRP_GETHOSTBYADDR
  251.     /* Should nnrpd do a dbzincore? */
  252.     /* =()<#define NNRP_DBZINCORE_DELAY    @<NNRP_DBZINCORE_DELAY>@>()= */
  253. #define NNRP_DBZINCORE_DELAY    40
  254.     /*  Strip Sender from posts that did authenticate? */
  255.     /* =()<#define @<NNRP_AUTH_SENDER>@_NNRP_AUTH_SENDER>()= */
  256. #define DONT_NNRP_AUTH_SENDER
  257.     /* How many read/write failures until channel is put to sleep or closed? */
  258.     /* =()<#define BAD_IO_COUNT    @<BAD_IO_COUNT>@>()= */
  259. #define BAD_IO_COUNT    5
  260.     /* Multiplier for sleep in EWOULDBLOCK writes (seconds). */
  261.     /* =()<#define BLOCK_BACKOFF    @<BLOCK_BACKOFF>@>()= */
  262. #define BLOCK_BACKOFF    (2 * 60)
  263.     /* How many article-writes between active and history updates? */
  264.     /* =()<#define ICD_SYNC_COUNT    @<ICD_SYNC_COUNT>@>()= */
  265. #define ICD_SYNC_COUNT    1
  266.     /* Tell resolver _res.options to be fast? */
  267.     /* =()<#define @<FAST_RESOLV>@_FAST_RESOLV>()= */
  268. #define DONT_FAST_RESOLV
  269.     /* Drop articles that were posted this many days ago. */
  270.     /* =()<#define DEFAULT_CUTOFF    @<DEFAULT_CUTOFF>@>()= */
  271. #define DEFAULT_CUTOFF    14
  272.     /* Maximum number of incoming NNTP connections. */
  273.     /* =()<#define DEFAULT_CONNECTIONS    @<DEFAULT_CONNECTIONS>@>()= */
  274. #define DEFAULT_CONNECTIONS    50
  275.     /* Wait this many seconds before channel restarts. */
  276.     /* =()<#define CHANNEL_RETRY_TIME    @<CHANNEL_RETRY_TIME>@>()= */
  277. #define CHANNEL_RETRY_TIME    (5 * 60)
  278.     /* Wait this many seconds before seeing if pause is ended. */
  279.     /* =()<#define PAUSE_RETRY_TIME    @<PAUSE_RETRY_TIME>@>()= */
  280. #define PAUSE_RETRY_TIME    (5 * 60)
  281.     /* Wait this many seconds before seeing if pause is ended. */
  282.     /* =()<#define CHANNEL_INACTIVE_TIME    @<CHANNEL_INACTIVE_TIME>@>()= */
  283. #define CHANNEL_INACTIVE_TIME    (10 * 60)
  284.     /* Put nntplink info (filename) into the log? */
  285.     /* =()<#define @<NNTPLINK_LOG>@_NNTPLINK_LOG>()= */
  286. #define DO_NNTPLINK_LOG
  287.     /* Log by host IP address, rather than from Path line? */
  288.     /* =()<#define @<IPADDR_LOG>@_IPADDR_LOG>()= */
  289. #define DO_IPADDR_LOG
  290.     /* Log NNTP activity after this many articles. */
  291.     /* =()<#define NNTP_ACTIVITY_SYNC    @<NNTP_ACTIVITY_SYNC>@>()= */
  292. #define NNTP_ACTIVITY_SYNC    200
  293.     /* Free buffers bigger than this when we're done with them. */
  294.     /* =()<#define BIG_BUFFER    @<BIG_BUFFER>@>()= */
  295. #define BIG_BUFFER    (2 * START_BUFF_SIZE)
  296.     /* A general small buffer. */
  297.     /* =()<#define SMBUF    @<SMBUF>@>()= */
  298. #define SMBUF    256
  299.     /* Buffer for a single article name. */
  300.     /* =()<#define MAXARTFNAME    @<MAXARTFNAME>@>()= */
  301. #define MAXARTFNAME    10
  302.     /* Buffer for a single pathname in the spool directory. */
  303.     /* =()<#define SPOOLNAMEBUFF    @<SPOOLNAMEBUFF>@>()= */
  304. #define SPOOLNAMEBUFF    256
  305.     /* Maximum size of a single header. */
  306.     /* =()<#define MAXHEADERSIZE    @<MAXHEADERSIZE>@>()= */
  307. #define MAXHEADERSIZE    1024
  308.     /* Byte limit on locally-posted articles; 0 to disable the check. */
  309.     /* =()<#define LOCAL_MAX_ARTSIZE    @<LOCAL_MAX_ARTSIZE>@>()= */
  310. #define LOCAL_MAX_ARTSIZE    0
  311.  
  312.     /* Function that returns no value, and a pointer to it. */
  313.     /* =()<#define FUNCTYPE    @<FUNCTYPE>@>()= */
  314. #define FUNCTYPE    void
  315. typedef FUNCTYPE    (*FUNCPTR)();
  316.  
  317.  
  318.  
  319.     /* While reading input, if we have less than LOW_WATER bytes free, we
  320.      * use the current buffersize as input to GROW_AMOUNT to determine how
  321.      * much to realloc.  (Doubling seems to be the best thing right now.)
  322.      * Growth must be at least NNTP_STRLEN bytes! */
  323. #define START_BUFF_SIZE        (4 * 1024)
  324. #define LOW_WATER        (1 * 1024)
  325. #define GROW_AMOUNT(x)        ((x))
  326.  
  327.     /* Some debuggers might need this set to an empty string. */
  328. #define STATIC            static
  329.  
  330.     /* How to store article numbers; note that INN is not int/long clean. */
  331. typedef unsigned long    ARTNUM;
  332.  
  333.     /* A general convenience; you shouldn't have to change this. */
  334. typedef int        BOOL;
  335.  
  336.     /* General values that you should not have to change. */
  337. #define MEMCPY_THRESHOLD    12
  338. #define MAX_BUILTIN_ARGV    20
  339. #define NNTP_PORT        119
  340. #define TRUE            1
  341. #define FALSE            0
  342. #define MAXLISTEN        5
  343. #define STDIN            0
  344. #define STDOUT            1
  345. #define PIPE_READ        0
  346. #define PIPE_WRITE        1
  347. #define DATE_FUZZ        (24L * 60L * 60L)
  348. #define COMMENT_CHAR        '#'
  349. #define ART_ACCEPT        '+'
  350. #define ART_CANC        'c'
  351. #define ART_JUNK        'j'
  352. #define ART_REJECT        '-'
  353. #define EXP_CONTROL        '!'
  354. #define FEED_MAXFLAGS        20
  355. #define FEED_BYTESIZE        'b'
  356. #define FEED_FULLNAME        'f'
  357. #define FEED_HDR_DISTRIB    'D'
  358. #define FEED_HDR_NEWSGROUP    'N'
  359. #define FEED_MESSAGEID        'm'
  360. #define FEED_FNLNAMES        '*'
  361. #define FEED_HEADERS        'H'
  362. #define FEED_NAME        'n'
  363. #define FEED_NEWSGROUP        'g'
  364. #define FEED_OVERVIEW        'O'
  365. #define FEED_REPLIC        'R'
  366. #define FEED_SITE        's'
  367. #define FEED_TIMERECEIVED    't'
  368. #define HIS_BADCHAR        '_'
  369. #define HIS_FIELDSEP        '\t'
  370. #define HIS_NOEXP        "-"
  371. #define HIS_SUBFIELDSEP        '~'
  372. #define NF_FIELD_SEP        ':'
  373. #define NF_FLAG_ALIAS        '='
  374. #define NF_FLAG_EXCLUDED    'j'
  375. #define NF_FLAG_MODERATED    'm'
  376. #define NF_FLAG_OK        'y'
  377. #define NF_FLAG_NOLOCAL        'n'
  378. #define NF_FLAG_IGNORE        'x'
  379. #define NF_SUBFIELD_SEP        '/'
  380. #define NG_SEPARATOR        ","
  381. #define NG_ISSEP(c)        ((c) == ',')
  382. #define RNEWS_MAGIC1        '#'
  383. #define RNEWS_MAGIC2        '!'
  384. #define SIG_MAXLINES        4
  385. #define SIG_SEPARATOR        "-- \n"
  386. #define SUB_DEFAULT        FALSE
  387. #define SUB_NEGATE        '!'
  388. #define LOOPBACK_HOST        "127.0.0.1"
  389.